Skip to content

fix(mobile): A document whose upload failed can be retried in the composer - #140

Closed
mwolson wants to merge 1 commit into
contrib/steady-mic-buttonfrom
contrib/mobile-document-upload-retry
Closed

mwolson wants to merge 1 commit into
contrib/steady-mic-buttonfrom
contrib/mobile-document-upload-retry

Conversation

@mwolson

@mwolson mwolson commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Problem

A document whose upload fails in the mobile composer cannot be retried. A failed photo or video has a thumbnail with a Retry button, but a document (a PDF, a text file, a large paste folded into a file) is only a chip in the draft text, and a chip has no Retry. Send stays disabled with "Retry or remove the failed attachment", and the only way forward is to delete the chip and attach the file again. The web composer offers Retry on a failed file.

To reproduce: attach a PDF on a phone while the upload cannot succeed, such as on a dropped connection. Expected: the document can be retried, as a photo can.

Change

While a document's upload is failed, the document shows in the attachment row above the draft as a file tile, with the same Retry and remove buttons a failed photo has. Retry uploads it again, and once the upload succeeds the tile goes away and the chip stays in the draft. Removing it from the tile also removes its chip. The tile's file name sits a little higher so the Retry button does not cover it.

Documents that upload normally look the same as before.

Scope

A small fix for an obvious bug, so there is no issue: the composer tells the user to retry and gives documents no way to do it. It came up in review of upstream PR 38395 mobile-send-block-reason, which makes that message visible; the two changes are independent and merge in either order.

Verification

Checked in the iOS Simulator (iPhone 18 Pro, iOS 27.0) with the dev client against an isolated dev server whose attachments directory I made read-only, so uploads fail.

Before the change, a failed PDF leaves only its chip and a gray Send. After it, the PDF also shows as a tile with Retry. With the directory writable again, tapping Retry uploads the PDF, the tile disappears and Send turns blue. With another failed PDF, tapping the tile's remove button removes the tile and its chip, and Send enables. In the collapsed composer the failed document shows as the small thumbnail with the retry icon, as a failed photo does.

Before After

One case added to the existing composerStripAttachments tests covers which attachments reach the row; it fails without the change. vp run check:changed passes.

Upstream

Merged upstream as PR 38443 mobile-document-upload-retry in pingdotgg/t3code (commit a93e61a343), and this layer carries that commit, including the maintainer's follow-up that pads the document tile only while an upload badge covers it. Drop this layer when the stack moves onto an upstream main that has it.

…poser

Upstream a93e61a (pingdotgg/t3code PR 38443 mobile-document-upload-retry), carried until the stack moves onto an upstream main that has it.

Co-authored-by: Julius Marminge <julius0216@outlook.com>
@mwolson
mwolson added this pull request to stack #142 November 18, 2026 16:28
@mwolson
mwolson removed this pull request from stack #142 November 19, 2026 19:30
@mwolson
mwolson added this pull request to stack #144 November 19, 2026 19:31
@mwolson
mwolson removed this pull request from stack #144 November 20, 2026 22:48
@mwolson

mwolson commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

Absorbed by upstream a93e61a (pingdotgg#38443 mobile-document-upload-retry); dropped from the stack at the 2026-11-20 refresh.

@mwolson mwolson closed this Nov 20, 2026
@mwolson
mwolson deleted the contrib/mobile-document-upload-retry branch November 20, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant